﻿using System;
using System.Linq;
using System.Collections.Generic;

using SimpleForum.Data.Models;
using SimpleForum.Data.Repositories;

namespace SimpleForum.Data.Services
{
    public class ForumService : IForumService
    {
        private readonly IRepository<Forum> ForumRepository;

        public ForumService(IRepository<Forum> ForumRepository)
        {
            this.ForumRepository = ForumRepository;
        }

        public Forum GetForum(int Id)
        {
            return ForumRepository.Get(Id);
        }

        public IEnumerable<Forum> GetForums()
        {
            return ForumRepository.Get();
        }
    }
}